/*
 * @Author: yaoqiwei 815482326@qq.com
 * @Date: 2023-11-01 14:25:13
 * @LastEditors: yaoqiwei 815482326@qq.com
 * @LastEditTime: 2023-11-07 15:08:01
 * @FilePath: \vue3-demo\src\router\index.ts
 * @Description: 路由配置
 */
import DemoViewVue from '/@/views/DemoView.vue'
import { createRouter, createWebHistory } from 'vue-router'
import type { App } from 'vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    // {
    //   path: '/',
    //   name: 'home',
    //   component: DemoView,
    // },
    {
      path: '/',
      name: 'home',
      component: DemoViewVue,
    },
  ],
})

export default router

export function setupRouter(app: App<Element>) {
  app.use(router)
}
